<?php

/**
 * lrArticleAdmin admin form
 *
 * @package    LRCMS
 * @subpackage lrArticleAdmin
 * @author     Thomas Ohms <http://www.lokarabia.de>
 */
class LrArticleAdminForm extends BaseLrArticleForm {
    public function configure() {
        parent::configure();

        $this->widgetSchema['is_active']->setLabel('Active') ;
        $this->widgetSchema['related_product_list_list']->setLabel('Select Product') ;
        $this->validatorSchema['title']->setOption('required',true);
        $this->validatorSchema['summary']->setOption('required',true);

        unset($this['newsletter'],$this['body'],$this['image_form']);
    }
    protected function createMediaFormForImage() {
        // get the DmMedia form
        $form = parent::createMediaFormForImage();

        // choose mime types allowed
        $form->setMimeTypeWhiteList(array(
                'image/jpeg',
                'image/png',
                'image/jpg',
                'image/gif'
        ));
        unset($form['legend'], $form['author'], $form['license']);
        return $form;
    }
}